package com.zhiyou10.crowdfunding.service.impl;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou10.crowdfunding.service.IProjectStypeService;
import com.zhiyou10.crowdfunding.vo.ProjectStype;
import com.zhiyou10.crowdfunding.vo.mapper.ProjectStypeMapper;
@Service
public class ProjectStypeServiceImpl implements IProjectStypeService {
	@Autowired
	private ProjectStypeMapper mapper;
	@Override
	public boolean add(ProjectStype vo) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doCreate(vo);
	}

	@Override
	public boolean edit(ProjectStype vo) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doUpdate(vo);
	}

	@Override
	public boolean remove(Set<Integer> ids) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doRemoveBatch(ids);
	}

	@Override
	public ProjectStype get(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper .findById(id);
	}

	@Override
	public List<ProjectStype> list() throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAll();
	}

	@Override
	public Long findAllCount() throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllCount();
	}

	@Override
	public List<ProjectStype> findAllSplit(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllSplit(map);
	}

}
